Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull Request Overview
This PR adds comprehensive end-to-end testing infrastructure for the converter contract, including Docker-based blockchain setup and BATS test framework integration. The changes enable automated testing of the complete converter contract lifecycle from deployment to execution in a controlled blockchain environment.
- Adds Docker Compose setup for running a local Manifest blockchain with custom configuration
- Implements BATS test suite with helper functions for contract interactions and blockchain queries
- Integrates E2E tests into the CI/CD pipeline with proper dependency management
Reviewed Changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| rust-toolchain.toml | Specifies Rust 1.86.0 toolchain with required components for WASM builds |
| e2e/tests/converter.bats | Main E2E test script covering converter contract deployment, execution, and edge cases |
| e2e/test_helper/common.sh | Helper functions for blockchain transactions, queries, and contract operations |
| e2e/test_helper/bats-support | Git submodule for BATS testing framework support utilities |
| e2e/test_helper/bats-assert | Git submodule for BATS assertion helpers |
| e2e/scripts/init_manifest_ledger.sh | Blockchain initialization script with genesis configuration |
| e2e/docker-compose.yml | Docker Compose configuration for local blockchain environment |
| e2e/.env | Environment variables for blockchain and test configuration |
| contracts/converter/src/msg.rs | Adds Migrate message variant to support contract migration testing |
| Makefile | Build targets for optimized WASM compilation and E2E environment management |
| Cargo.toml | Updates Rust version requirement to 1.86.0 |
| .gitmodules | Git submodule configuration for BATS dependencies |
| .gitignore | Excludes artifacts directory from version control |
| .github/workflows/ci.yml | Adds E2E testing job to CI pipeline with proper toolchain setup |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a comprehensive end-to-end (E2E) testing framework for the converter contract, modernizes the build process, and improves project configuration and maintainability. The most significant changes are the addition of E2E tests using Dockerized environments and Bats, streamlining of WASM build and optimization, and several updates to Rust toolchain and workflow automation.
End-to-End Testing Infrastructure:
Added a full E2E test suite using Bats, including test scripts (
e2e/tests/converter.bats), helper functions (e2e/test_helper/common.sh), and Bats assertion libraries as submodules. Tests are run in a Docker Compose environment simulating a blockchain ledger, with all necessary environment variables and scripts for chain initialization. [1] [2] [3] [4] [5] [6] [7] [8]Introduced a new
e2ejob in the GitHub Actions CI workflow to automate E2E testing, including installation of dependencies and orchestration of the test environment.Build and Workflow Improvements:
Refactored WASM build and optimization steps to use a new
build-opttarget in theMakefile, which checks for dependencies, builds, optimizes, and verifies WASM binaries, replacing ad-hoc shell commands in the CI workflow. [1] [2]Updated the Rust toolchain to version 1.86.0 and specified required components and targets for consistent development and CI environments. [1] [2]
Contract and Codebase Updates:
Migrate {}variant to theMigrateMsgenum in the converter contract for future-proofing migrations.CI and Dependency Updates:
cargo-tarpaulinused for code coverage in CI to 1.90.0 for improved compatibility and reliability.References:
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14]